export function getSalseHotelNames(options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/names',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      city: options.city || null,
      searchKey: options.searchKey || null
    }
  })
}

export function getSaleHotelAll(options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/allhotel',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      city: options.city || null,
      searchKey: options.searchKey || null,
      status: options.status
    }
  })
}

export function addSaleHotel(options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/add',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      hotelIds: options.hotelIds || null,
      status: options.status
    }
  })
}

export function getSaleHotelList(options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/list',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      searchKey: options.searchKey || null,
      city: options.city || null,
      status: options.statusSelect
    }
  })
}

export function setSaleHotelState(options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/enable/toggle',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      status: options.statusBtn,
      saleHotelIds: options.saleHotelIds || null
    }
  })
}

//  酒店图片集  通过酒店获取酒店图片
export function getHotelPicByid(id) {
  return window.fetch({
    method: 'POST',
    url: '/qn/hotel/list',
    data: id
  })
}

//酒店相册（新增/更新） 
export function addupHotelPic(data) {
  return window.fetch({
    method: 'POST',
    url: '/qn/hotel/addup',
    data: data
  })
}

// 删除相册
export function deleteHotelPictureList(data) {
  return window.fetch({
    method: 'POST',
    url: '/qn/hotel/delete',
    data: data
  })
}

// 酒店图片集 
export function getImglist(id) {
  return window.fetch({
    method: 'POST',
    url: '/qn/hotel/imglist',
    data: id
  })
}

// 酒店图片上传 
export function imageAdd(id) {
  return window.fetch({
    method: 'POST',
    url: '/qn/hotel/add',
    data: id
  })
}

// 推荐酒店、取消酒店 /hotel/recomm
export function recomm(data) {
  return window.fetch({
    method: 'POST',
    url: '/hotel/recomm',
    data: data
  })
}

